/**
 * Created by 李威 on 2021/9/13.
 */
var imgEle = document.querySelector(".small-banner");



//修改属性
//imgEle.src = "images/1.png";

function changeImg(index){
var imgArray = ["big-banner1.jpg","big-banner2.jpg","big-banner3.jpg","big-banner4.jpg","big-banner5.jpg"];
    var imgSrc = "images/" + imgArray[index-1];
    document.querySelector(".banner a img").src = imgSrc;
}

var proArray2 = [
    {
        proId:18965644,
        proName:'消毒纸巾',
        proPrice:23.9
    },
    {
        proId:155787136,
        proName:'天堂雨伞',
        proPrice:39.9
    },
    {
        proId:486853568,
        proName:'飞科剃须刀',
        proPrice:99.9
    }
];
var proList = document.querySelector(".pro-list");
for(var i = 0; i < proArray2.length ; i++){
    var id = proArray2[i].proId;
    var name = proArray2[i].proName;
    var price = proArray2[i].proPrice;
    var liEle = '<li>商品id:<a href="">'+id +'</a>' +
        '商品名称:<span>'+name +'</span>' +
        '商品价格:<span>'+price +'</span></li>';
    proList.innerHTML += liEle;
}